fix(utils.py): support fireworks ai finetuned models

Fixes https://github.com/BerriAI/litellm/issues/4923
This commit is contained in:
Krrish Dholakia 2024-07-27 15:37:28 -07:00
parent 56ba0c62f3
commit 70b281c0aa
2 changed files with 10 additions and 1 deletions

View file

@ -4473,7 +4473,7 @@ def get_llm_provider(
dynamic_api_key = api_key or get_secret("DEEPSEEK_API_KEY")
elif custom_llm_provider == "fireworks_ai":
# fireworks is openai compatible, we just need to set this to custom_openai and have the api_base be https://api.fireworks.ai/inference/v1
if not model.startswith("accounts/fireworks/models"):
if not model.startswith("accounts/"):
model = f"accounts/fireworks/models/{model}"
api_base = api_base or "https://api.fireworks.ai/inference/v1"
dynamic_api_key = api_key or (