mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
refactor(test_router_caching.py): move tpm/rpm routing tests to separate file
This commit is contained in:
parent
18ef244230
commit
dff4c172d0
3 changed files with 18 additions and 45 deletions
|
@ -1564,6 +1564,23 @@ class Router:
|
|||
):
|
||||
model["litellm_params"]["tpm"] = model.get("tpm")
|
||||
|
||||
#### VALIDATE MODEL ########
|
||||
# check if model provider in supported providers
|
||||
(
|
||||
model,
|
||||
custom_llm_provider,
|
||||
dynamic_api_key,
|
||||
api_base,
|
||||
) = litellm.get_llm_provider(
|
||||
model=model["litellm_params"]["model"],
|
||||
custom_llm_provider=model["litellm_params"].get(
|
||||
"custom_llm_provider", None
|
||||
),
|
||||
)
|
||||
|
||||
if custom_llm_provider not in litellm.provider_list:
|
||||
raise Exception(f"Unsupported provider - {custom_llm_provider}")
|
||||
|
||||
self.set_client(model=model)
|
||||
|
||||
self.print_verbose(f"\nInitialized Model List {self.model_list}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue