mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix _model_custom_llm_provider_matches_wildcard_pattern
This commit is contained in:
parent
0eb23f635f
commit
d215b65f51
1 changed files with 6 additions and 1 deletions
|
|
@ -1161,7 +1161,12 @@ def _model_custom_llm_provider_matches_wildcard_pattern(
|
|||
- `model=claude-3-5-sonnet-20240620`
|
||||
- `allowed_model_pattern=anthropic/*`
|
||||
"""
|
||||
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
|
||||
try:
|
||||
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.error(f"Error getting LLM provider for model {model}: {e}")
|
||||
return False
|
||||
|
||||
return is_model_allowed_by_pattern(
|
||||
model=f"{custom_llm_provider}/{model}",
|
||||
allowed_model_pattern=allowed_model_pattern,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue