mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) use regex pattern matching for wildcard routing (#6150)
* use pattern matching for llm deployments * code quality fix * fix linting * add types to PatternMatchRouter * docs add example config for regex patterns
This commit is contained in:
parent
6005450c8f
commit
89506053a4
6 changed files with 169 additions and 40 deletions
|
@ -109,7 +109,7 @@ async def route_request(
|
|||
return getattr(litellm, f"{route_type}")(**data)
|
||||
elif (
|
||||
llm_router.default_deployment is not None
|
||||
or len(llm_router.provider_default_deployments) > 0
|
||||
or len(llm_router.pattern_router.patterns) > 0
|
||||
):
|
||||
return getattr(llm_router, f"{route_type}")(**data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue