Added handling of unmapped provider, with test

This commit is contained in:
James Braza 2024-06-11 18:34:10 -07:00
parent 8be37bee04
commit ef6e920161
2 changed files with 8 additions and 1 deletions

View file

@ -6242,7 +6242,10 @@ def get_supported_openai_params(
- None if unmapped
"""
if not custom_llm_provider:
custom_llm_provider = litellm.get_llm_provider(model=model)[1]
try:
custom_llm_provider = litellm.get_llm_provider(model=model)[1]
except BadRequestError:
return None
if custom_llm_provider == "bedrock":
return litellm.AmazonConverseConfig().get_supported_openai_params(model=model)
elif custom_llm_provider == "ollama":