mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: exclude complexity_router from auto_router check
The _is_auto_router_deployment() was matching all auto_router/* models, causing complexity_router to fail initialization. Now it explicitly excludes auto_router/complexity_router which has its own handler.
This commit is contained in:
parent
95c6bfaa06
commit
9d575bc2c9
1 changed files with 4 additions and 1 deletions
|
|
@ -6227,10 +6227,13 @@ class Router:
|
|||
|
||||
def _is_auto_router_deployment(self, litellm_params: LiteLLM_Params) -> bool:
|
||||
"""
|
||||
Check if the deployment is an auto-router deployment.
|
||||
Check if the deployment is an auto-router deployment (semantic router).
|
||||
|
||||
Returns True if the litellm_params model starts with "auto_router/"
|
||||
but NOT "auto_router/complexity_router" (which uses complexity routing).
|
||||
"""
|
||||
if litellm_params.model.startswith("auto_router/complexity_router"):
|
||||
return False # This is handled by complexity_router
|
||||
if litellm_params.model.startswith("auto_router/"):
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue