fix: fix tests

This commit is contained in:
Krrish Dholakia 2024-11-29 21:03:31 -08:00
parent 204dd72c37
commit 711a1428f8
2 changed files with 1 additions and 3 deletions

View file

@ -904,7 +904,6 @@ async def can_key_call_model(
if llm_router: if llm_router:
access_groups = llm_router.get_model_access_groups(model_name=model) access_groups = llm_router.get_model_access_groups(model_name=model)
models_in_current_access_groups = []
if ( if (
len(access_groups) > 0 and llm_router is not None len(access_groups) > 0 and llm_router is not None
): # check if token contains any model access groups ): # check if token contains any model access groups
@ -917,7 +916,6 @@ async def can_key_call_model(
# Filter out models that are access_groups # Filter out models that are access_groups
filtered_models = [m for m in valid_token.models if m not in access_groups] filtered_models = [m for m in valid_token.models if m not in access_groups]
filtered_models += models_in_current_access_groups
verbose_proxy_logger.debug(f"model: {model}; allowed_models: {filtered_models}") verbose_proxy_logger.debug(f"model: {model}; allowed_models: {filtered_models}")
all_model_access: bool = False all_model_access: bool = False

View file

@ -81,7 +81,7 @@ async def test_bedrock_max_completion_tokens(model: str, respx_mock: MockRouter)
@pytest.mark.parametrize( @pytest.mark.parametrize(
"model", "model",
["anthropic/claude-3-sonnet-20240229", "anthropic/claude-3-opus-20240229,"], ["anthropic/claude-3-sonnet-20240229", "anthropic/claude-3-opus-20240229"],
) )
@pytest.mark.respx @pytest.mark.respx
@pytest.mark.asyncio() @pytest.mark.asyncio()