forked from phoenix/litellm-mirror
fix using wildcard models on proxy
This commit is contained in:
parent
50081479f9
commit
020fb54ea7
1 changed files with 5 additions and 1 deletions
|
@ -703,7 +703,11 @@ async def user_api_key_auth(
|
|||
verbose_proxy_logger.debug(
|
||||
f"model: {model}; allowed_models: {filtered_models}"
|
||||
)
|
||||
if model is not None and model not in filtered_models:
|
||||
if (
|
||||
model is not None
|
||||
and model not in filtered_models
|
||||
and "*" not in filtered_models
|
||||
):
|
||||
raise ValueError(
|
||||
f"API Key not allowed to access model. This token can only access models={valid_token.models}. Tried to access {model}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue