From 2ec4ce178c1b21eecf78a6a39a08377d928ca6aa Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Mon, 16 Mar 2026 19:21:18 +0530 Subject: [PATCH] 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 --- litellm/proxy/route_llm_request.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/route_llm_request.py b/litellm/proxy/route_llm_request.py index a8169ca6d08..e5fc9fe76a4 100644 --- a/litellm/proxy/route_llm_request.py +++ b/litellm/proxy/route_llm_request.py @@ -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: