From 42f9b1255afd0f1065863bc9c5156e5e464607c3 Mon Sep 17 00:00:00 2001 From: Daniel Bichuetti Date: Tue, 16 Jul 2024 09:19:19 -0300 Subject: [PATCH 1/2] Update model_prices_and_context_window.json --- model_prices_and_context_window.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 60f812b2bb..c9a92972cd 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -4086,7 +4086,7 @@ "litellm_provider": "perplexity", "mode": "chat" }, - "fireworks_ai/firefunction-v2": { + "fireworks_ai/accounts/fireworks/models/firefunction-v2": { "max_tokens": 8192, "max_input_tokens": 8192, "max_output_tokens": 8192, @@ -4097,7 +4097,7 @@ "supports_function_calling": true, "source": "https://fireworks.ai/pricing" }, - "fireworks_ai/mixtral-8x22b-instruct-hf": { + "fireworks_ai/accounts/fireworks/models/mixtral-8x22b-instruct-hf": { "max_tokens": 65536, "max_input_tokens": 65536, "max_output_tokens": 65536, @@ -4108,7 +4108,7 @@ "supports_function_calling": true, "source": "https://fireworks.ai/pricing" }, - "fireworks_ai/qwen2-72b-instruct": { + "fireworks_ai/accounts/fireworks/models/qwen2-72b-instruct": { "max_tokens": 32768, "max_input_tokens": 32768, "max_output_tokens": 32768, @@ -4119,7 +4119,7 @@ "supports_function_calling": true, "source": "https://fireworks.ai/pricing" }, - "fireworks_ai/yi-large": { + "fireworks_ai/accounts/fireworks/models/yi-large": { "max_tokens": 32768, "max_input_tokens": 32768, "max_output_tokens": 32768, @@ -4130,7 +4130,7 @@ "supports_function_calling": true, "source": "https://fireworks.ai/pricing" }, - "fireworks_ai/deepseek-coder-v2-instruct": { + "fireworks_ai/accounts/fireworks/models/deepseek-coder-v2-instruct": { "max_tokens": 65536, "max_input_tokens": 65536, "max_output_tokens": 8192, From 8b830358e3d9b941e9143ebc15944668859aacdb Mon Sep 17 00:00:00 2001 From: Daniel Bichuetti Date: Wed, 17 Jul 2024 08:19:36 -0300 Subject: [PATCH 2/2] Update utils.py Allow using custom models and on-demand deployments --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 48fdf80c59..76292b3a42 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4417,7 +4417,7 @@ def get_llm_provider( dynamic_api_key = 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 = (