litellm - ✅(Solved) Fix [Feature]: Expand VideoMetadata support to all Gemini Models. [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25474Fetched 2026-04-11 06:14:09
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1mentioned ×1subscribed ×1

PR fix notes

PR #25767: feat: Expand VideoMetadata support to all Gemini Models.

Description (problem / solution / changelog)

Relevant issues

https://github.com/BerriAI/litellm/issues/25474

Pre-Submission checklist

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

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • 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).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

<!-- Include screenshots, screen recordings, or log output demonstrating that your changes work as expected. For bug fixes: show reproduction before the fix and passing behavior after. For new features: show the feature working end-to-end. For UI changes: include before/after screenshots. -->

Type

<!-- Select the type of Pull Request --> <!-- Keep only the necessary ones -->

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

Changes

Changed files

  • docs/my-website/docs/providers/vertex.md (modified, +7/-4)
  • litellm/llms/vertex_ai/gemini/transformation.py (modified, +14/-12)
  • tests/test_litellm/llms/vertex_ai/gemini/test_vertex_ai_gemini_transformation.py (modified, +88/-0)
  • tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py (modified, +25/-35)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

In issue #19026, support for VideoMetadata (e.g., fps, start_offset, end_offset) and media_resolution was introduced. However, the current implementation in LiteLLM appears to restrict these configurations only to Gemini models version 3.0 and above.

According to the official Vertex AI documentation, video processing customization is a feature of the Gemini API architecture and is fully supported for the Gemini 2.5 model family (e.g., gemini-2.5-flash, gemini-2.5-pro).

I am requesting that the version check/restriction be removed or updated so that these metadata configurations can be applied to all Gemini models.

Motivation, pitch

I am currently integrating Gemini 2.5 (specifically gemini-2.5-flash) into a high-precision video analysis pipeline. To optimize performance and cost, I need to use the video_metadata (for fps and start_offset/end_offset) and media_resolution features.

While these features were added to LiteLLM in Issue #19026, the current implementation limits their availability to Gemini models version 3.0 and above. However, the official Vertex AI documentation confirms that these processing customizations are fully supported across the entire Gemini lineup, including the 2.5 family.

Without this update, users on the 2.5 family—which is often preferred for its balance of speed and reasoning—are forced to use default sampling rates, leading to higher token costs and lower accuracy for tasks requiring specific frame rates.

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

TL;DR

Remove or update the version check in LiteLLM to allow video metadata configurations for all Gemini models, not just version 3.0 and above.

Guidance

  • Review the implementation of video metadata configurations in LiteLLM, specifically the version check that restricts these features to Gemini models version 3.0 and above.
  • Update the version check to include Gemini 2.5 models, such as gemini-2.5-flash, to allow video metadata configurations for these models.
  • Verify that the updated implementation works as expected by testing it with Gemini 2.5 models and checking that video metadata configurations are applied correctly.
  • Consider updating the documentation to reflect the changed version support.

Notes

The official Vertex AI documentation confirms that video processing customization is supported for the Gemini 2.5 model family, so updating the version check in LiteLLM should allow these features to work as expected for these models.

Recommendation

Apply workaround: Update the version check in LiteLLM to include Gemini 2.5 models, as the official Vertex AI documentation confirms that these models support video processing customization.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING