BerriAI/litellm · error · NotImplementedError
video extension is not supported for Gemini
Error message
video extension is not supported for Gemini
What it means
transform_video_extension_request for Gemini raises NotImplementedError: Veo cannot extend an existing video by N seconds through this integration. Clip length is fixed at generation time via the durationSeconds parameter (within the model's allowed range), so 'extend later' is not an operation the provider supports.
Solutions
- Plan duration up front and pass duration_seconds (mapped to durationSeconds) in the original video_generation call.
- If a longer video is needed afterwards, generate a new clip with the higher durationSeconds.
- Hide the extend action for Gemini-backed models.
Example fix
# before
litellm.video_extension(
model="gemini/veo-3", video_id=video.id, seconds=4, prompt="continue the scene"
)
# after: set duration at creation time instead of extending later
video = litellm.video_generation(
model="gemini/veo-3", prompt="a cat surfing", duration_seconds=8
) Defensive patterns
Strategy: try-catch
Validate before calling
def provider_supports_video_extension(model: str) -> bool:
return not model.lower().startswith(("gemini/", "vedo/")) Type guard
def can_extend_video(model: str) -> bool:
return not model.lower().startswith(("gemini/", "vedo/")) Try / catch
try:
ext = litellm.video_extension(model=model, video_id=video_id, seconds=4, prompt=p)
except NotImplementedError:
if model.startswith("gemini/"):
ext = litellm.video_generation(model=model, prompt=p, duration_seconds=8) # regenerate longer Prevention
- Decide clip duration up front and pass duration_seconds to video_generation.
- Disable 'extend' controls for Gemini-backed models.
- Remember Veo clips are bounded (e.g. up to 8s for Veo 3); plan shots accordingly.
When it happens
Trigger: Calling litellm.video_extension(model='gemini/veo-3', video_id=..., seconds=4, prompt=...).
Common situations: Apps ported from Runway or other providers that offer extend; 'make it longer' UI affordances applied uniformly across providers.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- video create character is not supported for Gemini
- Video delete is not supported by Google Veo.
- Video delete is not supported by Google Veo. Videos are…
- video edit is not supported for Gemini
- video get character is not supported for Gemini
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/e125262761e7e574.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/gemini/videos/transformation.py:593
self,
raw_response,
logging_obj,
custom_llm_provider=None,
request_data=None,
):
raise NotImplementedError("video edit is not supported for Gemini")
def transform_video_extension_request(
self,
prompt,
video_id,
seconds,
api_base,
litellm_params,
headers,
extra_body=None,
):
raise NotImplementedError("video extension is not supported for Gemini")
def transform_video_extension_response(self, raw_response, logging_obj, custom_llm_provider=None):
raise NotImplementedError("video extension is not supported for Gemini")
def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:
from ..common_utils import GeminiError
return GeminiError(
status_code=status_code,
message=error_message,
headers=headers,
)
View on GitHub (pinned to 77b7c6c40c)