fix(routing): include avideo_create_character and avideo_get_character in router-first routing

Add avideo_create_character and avideo_get_character to the list of video endpoints
that use router-first routing when a model is provided (either from decoded IDs or
target_model_names).

Previously only avideo_edit and avideo_extension were in the router-first block.
This ensures both character endpoints benefit from multi-deployment load balancing
and model resolution, making them consistent with the other video operations.

This allows:
- avideo_create_character: Router picks among multiple deployments when target_model_names is set
- avideo_get_character: Router assists with multi-model environments for consistency

Made-with: Cursor
This commit is contained in:
Sameer Kankute 2026-03-16 19:21:18 +05:30
parent ddf62e0651
commit 2ec4ce178c

View file

@ -461,10 +461,13 @@ async def route_request( # noqa: PLR0915 - Complex routing function, refactorin
"avideo_status",
"avideo_content",
"avideo_remix",
"avideo_create_character",
"avideo_get_character",
"avideo_edit",
"avideo_extension",
]:
# Video endpoints: If model is provided (e.g., from decoded video_id), try router first
# Video endpoints: If model is provided (e.g., from decoded video_id or target_model_names),
# try router first to allow for multi-deployment load balancing
try:
return getattr(llm_router, f"{route_type}")(**data)
except Exception: