The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Don't add "accounts/fireworks/models" prefix for Fireworks Provider (#15938)
1stprinciple2824388c30ed
diff --git a/litellm/llms/fireworks_ai/chat/transformation.py b/litellm/llms/fireworks_ai/chat/transformation.pyindex 524b1c97145..a65eaf38845 100644--- a/litellm/llms/fireworks_ai/chat/transformation.py+++ b/litellm/llms/fireworks_ai/chat/transformation.py@@ -1,10 +1,10 @@import json-from litellm._uuid import uuidfrom typing import Any, List, Literal, Optional, Tuple, Union, castimport httpximport litellm+from litellm._uuid import uuidfrom litellm.constants import RESPONSE_FORMAT_TOOL_NAMEfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObjfrom litellm.litellm_core_utils.llm_response_utils.get_headers import (@@ -102,15 +102,15 @@ class FireworksAIConfig(OpenAIGPTConfig):"prompt_truncate_length","context_length_exceeded_behavior",]-+# Only add tools for models that support function callingif supports_function_calling(model=model, custom_llm_provider="fireworks_ai"):supported_params.append("tools")-+# Only add tool_choice for models that explicitly support itif supports_tool_choice(model=model, custom_llm_provider="fireworks_ai"):supported_params.append("tool_choice")-+return supported_paramsdef map_openai_params(@@ -246,7 +246,7 @@ class FireworksAIConfig(OpenAIGPTConfig):litellm_params: dict,headers: dict,) -> dict:- if not model.startswith("accounts/"):+ if not model.startswith("accounts/") and "#" not in model:model = f"accounts/fireworks/models/{model}"messages = self._transform_messages_helper(messages=messages, model=model, litellm_params=litellm_paramsdiff --git a/litellm/llms/fireworks_ai/completion/transformation.py b/litellm/llms/fireworks_ai/completion/transformation.pyindex 607e709c425..3ac77288c70 100644--- a/litellm/llms/fireworks_ai/completion/transformation.py+++ b/litellm/llms/fireworks_ai/completion/transformation.py@@ -50,7 +50,7 @@ class FireworksAITextCompletionConfig(FireworksAIMixin, BaseTextCompletionConfig) -> dict:prompt = _transform_prompt(messages=messages)- if not model.startswith("accounts/"):+ if not model.startswith("accounts/") and "#" not in model:model = f"accounts/fireworks/models/{model}"data = {