mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(pattern_match_deployments.py): default to user input if unable to map based on wildcards (#6646)
This commit is contained in:
parent
c24a7c91c3
commit
8abed99b3c
3 changed files with 41 additions and 6 deletions
|
@ -960,6 +960,18 @@ def test_replace_model_in_jsonl(model_list):
|
|||
"openai/gpt-3.5-turbo",
|
||||
"openai/gpt-3.5-turbo",
|
||||
),
|
||||
(
|
||||
"bedrock/meta.llama3-70b",
|
||||
"*meta.llama3*",
|
||||
"bedrock/meta.llama3-*",
|
||||
"bedrock/meta.llama3-70b",
|
||||
),
|
||||
(
|
||||
"meta.llama3-70b",
|
||||
"*meta.llama3*",
|
||||
"bedrock/meta.llama3-*",
|
||||
"meta.llama3-70b",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_pattern_match_deployment_set_model_name(
|
||||
|
@ -1000,9 +1012,10 @@ def test_pattern_match_deployment_set_model_name(
|
|||
for model in updated_models:
|
||||
assert model["litellm_params"]["model"] == expected_model
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_pass_through_moderation_endpoint_factory(model_list):
|
||||
router = Router(model_list=model_list)
|
||||
response = await router._pass_through_moderation_endpoint_factory(
|
||||
original_function=litellm.amoderation, input="this is valid good text"
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue