BerriAI/litellm · error · NotImplementedError
video create character is not supported for this provider
Error message
video create character is not supported for this provider
What it means
BaseVideosConfig.transform_video_create_character_request() is only implemented by providers that support character creation for video generation (uploading a reference character image as multipart). The base class deliberately raises NotImplementedError('video create character is not supported for this provider') so unsupported providers fail loudly instead of silently producing garbage. Hitting it means the configured video provider has no character API.
Source
Thrown at litellm/llms/base_llm/videos/transformation.py:280
custom_llm_provider: str | None = None,
) -> VideoObject:
pass
def transform_video_create_character_request(
self,
name: str,
video: Any,
api_base: str,
litellm_params: GenericLiteLLMParams,
headers: dict,
) -> tuple[str, list]:
"""
Transform the video create character request into a URL and files list (multipart).
Returns:
Tuple[str, list]: (url, files_list) for the multipart POST request
"""
raise NotImplementedError("video create character is not supported for this provider")
def transform_video_create_character_response(
self,
raw_response: httpx.Response,
logging_obj: LiteLLMLoggingObj,
) -> CharacterObject:
raise NotImplementedError("video create character is not supported for this provider")
def transform_video_get_character_request(
self,
character_id: str,
api_base: str,
litellm_params: GenericLiteLLMParams,
headers: dict,
) -> tuple[str, dict]:
"""
Transform the video get character request into a URL and params.
View on GitHub (pinned to 6c2dcb801b)
Solutions
- Check the provider's documentation/config for character support before calling character endpoints; use a provider that implements the character API.
- Feature-test at startup: `hasattr`/override check on the provider config's transform_video_create_character_request versus the base, and disable the character flow if unsupported.
- Fall back to prompt-only video generation (no character reference) when the provider lacks support.
Example fix
# before
await litellm.acreate_video_character(provider="myvid", name="hero", video=img) # NotImplementedError
# after: feature-check then fall back
from litellm.llms.base_llm.videos.transformation import BaseVideosConfig
cfg = get_videos_config("myvid")
if type(cfg).transform_video_create_character_request is BaseVideosConfig.transform_video_create_character_request:
job = await litellm.avideo_generate(model="myvid/model-a", prompt="a hero like the reference")
else:
char = await litellm.acreate_video_character(provider="myvid", name="hero", video=img) Defensive patterns
Strategy: type-guard
Validate before calling
from litellm.llms.base_llm.videos.transformation import BaseVideosConfig
def provider_supports_characters(cfg: BaseVideosConfig) -> bool:
return type(cfg).transform_video_create_character_request is not BaseVideosConfig.transform_video_create_character_request Type guard
from litellm.llms.base_llm.videos.transformation import BaseVideosConfig
def provider_supports_characters(cfg: BaseVideosConfig) -> bool:
return (
type(cfg).transform_video_create_character_request
is not BaseVideosConfig.transform_video_create_character_request
) Try / catch
try:
char = await litellm.acreate_video_character(provider=p, name=n, video=img)
except NotImplementedError:
job = await litellm.avideo_generate(model=m, prompt=f"a character named {n}") # prompt-only fallback Prevention
- Check provider capability matrices before adopting character APIs.
- Gate character features behind a runtime capability check on the config class.
When it happens
Trigger: Calling the video character-create path (e.g. litellm's video character upload/create) against a provider whose config does not override transform_video_create_character_request — e.g. a provider that only supports text-to-video.
Common situations: Assuming every video provider supports character reuse because one (e.g. a Chinese video provider with character APIs) does; porting character-based workflows to a new provider; feature-detection missing before calling character endpoints.
Related errors
- Model not found in cost map for model={model}
- validate_environment must be implemented by provider
- acreate_sandbox must be implemented by provider
- arun_code must be implemented by provider
- adelete_sandbox must be implemented by provider
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/e78562e7de357040.
Report an issue: GitHub.