forked from phoenix/litellm-mirror
add test_regex_pattern_matching_e2e_test
This commit is contained in:
parent
f76d0e41ef
commit
a18aeaa2fb
2 changed files with 23 additions and 0 deletions
|
@ -473,6 +473,24 @@ async def test_openai_wildcard_chat_completion():
|
|||
await chat_completion(session=session, key=key, model="gpt-3.5-turbo-0125")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_regex_pattern_matching_e2e_test():
|
||||
"""
|
||||
- Create key for model = "custom-llm-engine/*" -> this has access to all models matching pattern = "custom-llm-engine/*"
|
||||
- proxy_server_config.yaml has model = "custom-llm-engine/*"
|
||||
- Make chat completion call
|
||||
|
||||
"""
|
||||
async with aiohttp.ClientSession() as session:
|
||||
key_gen = await generate_key(session=session, models=["custom-llm-engine/*"])
|
||||
key = key_gen["key"]
|
||||
|
||||
# call chat/completions with a model that the key was not created for + the model is not on the config.yaml
|
||||
await chat_completion(
|
||||
session=session, key=key, model="custom-llm-engine/very-new-model"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_proxy_all_models():
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue