fix(greptile-review): address backward compatibility and code quality issues

- Remove duplicate DecodedCharacterId TypedDict from litellm/types/videos/main.py
- Remove dead LITELLM_MANAGED_VIDEO_CHARACTER_COMPLETE_STR constant from litellm/types/utils.py
- Add FastAPI Form validation for name field in video_create_character endpoint

Made-with: Cursor
This commit is contained in:
Sameer Kankute
2026-03-16 19:17:06 +05:30
parent 9beec825d4
commit 1ccf67dd93
3 changed files with 2 additions and 12 deletions
+2 -1
View File
@@ -3,7 +3,7 @@
from typing import Any, Dict, Optional
import orjson
from fastapi import APIRouter, Depends, File, Request, Response, UploadFile
from fastapi import APIRouter, Depends, File, Form, Request, Response, UploadFile
from fastapi.responses import ORJSONResponse
from litellm.proxy._types import *
@@ -530,6 +530,7 @@ async def video_create_character(
request: Request,
fastapi_response: Response,
video: UploadFile = File(...),
name: str = Form(...),
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
"""
-3
View File
@@ -3493,9 +3493,6 @@ class SpecialEnums(Enum):
LITELLM_MANAGED_VIDEO_COMPLETE_STR = (
"litellm:custom_llm_provider:{};model_id:{};video_id:{}"
)
LITELLM_MANAGED_VIDEO_CHARACTER_COMPLETE_STR = (
"litellm:custom_llm_provider:{};model_id:{};character_id:{}"
)
class ServiceTier(Enum):
-8
View File
@@ -106,14 +106,6 @@ class DecodedVideoId(TypedDict, total=False):
video_id: str
class DecodedCharacterId(TypedDict, total=False):
"""Structure representing a decoded character ID"""
custom_llm_provider: Optional[str]
model_id: Optional[str]
character_id: str
class CharacterObject(BaseModel):
"""Represents a character created from a video."""