Skip to content

feat(voyage): add video content block support to multimodal embeddings - #32228

Draft
silencedoctor wants to merge 1 commit into
BerriAI:mainfrom
silencedoctor:feat/voyage-multimodal-video-support
Draft

silencedoctor wants to merge 1 commit into
BerriAI:mainfrom
silencedoctor:feat/voyage-multimodal-video-support

Conversation

@silencedoctor

Copy link
Copy Markdown
Contributor

Voyage's multimodal embeddings API supports MP4 video via video_url and video_base64 content blocks in addition to text and image. The existing VoyageMultimodalEmbeddingConfig added in #30193 does not handle these — video blocks fall through to the identity branch, so OpenAI-style nested {"url": ...} dicts are not unwrapped and data:video/mp4;base64,... data URIs are not converted to the video_base64 shape Voyage expects.

Extend _normalize_content_item with a video_url branch that mirrors the existing image_url logic:

  • unwrap {"url": ...} dicts (OpenAI-style)
  • convert data:video/mp4;base64,... URIs to video_base64 blocks
  • raise ValueError on missing/empty video URLs
  • pass explicit video_base64 blocks through unchanged

6 new unit tests cover each path plus an end-to-end request transform with mixed text + video content.

Refs #24957 — this complements #30193 by closing the video gap that was in the original #24972 draft but never landed on main.

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@silencedoctor
silencedoctor force-pushed the feat/voyage-multimodal-video-support branch from 1f7cc82 to 05adf41 Compare July 29, 2026 11:12
@codspeed

codspeed Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing silencedoctor:feat/voyage-multimodal-video-support (06d7498) with litellm_internal_staging (04177e7)

Open in CodSpeed

@silencedoctor
silencedoctor changed the base branch from main to litellm_internal_staging July 29, 2026 12:24
Voyage's multimodal embeddings API supports MP4 video via `video_url`
and `video_base64` content blocks in addition to text and image. The
existing `VoyageMultimodalEmbeddingConfig` added in BerriAI#30193 does not
handle these — video blocks fall through to the identity branch, so
OpenAI-style nested `{"url": ...}` dicts are not unwrapped and
`data:video/mp4;base64,...` data URIs are not converted to the
`video_base64` shape Voyage expects.

Extend `_normalize_content_item` with a `video_url` branch that mirrors
the existing `image_url` logic:

- unwrap `{"url": ...}` dicts (OpenAI-style)
- convert `data:video/mp4;base64,...` URIs to `video_base64` blocks
- raise `ValueError` on missing/empty video URLs
- pass explicit `video_base64` blocks through unchanged

6 new unit tests cover each path plus an end-to-end request transform
with mixed text + video content.

Refs BerriAI#24957 — this complements BerriAI#30193 by closing the video gap that
was in the original BerriAI#24972 draft but never landed on main.
@silencedoctor
silencedoctor force-pushed the feat/voyage-multimodal-video-support branch from 05adf41 to 06d7498 Compare July 30, 2026 02:40
@yuneng-berri
yuneng-berri deleted the branch BerriAI:main September 13, 2026 04:28
@yuneng-berri yuneng-berri reopened this Sep 13, 2026
@devin-ai-integration
devin-ai-integration Bot changed the base branch from litellm_internal_staging to main September 23, 2026 15:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants