Skip to content

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]

docs(fireworks): explain what get_model_cost_key is for

Devin AIf1fe61af06dd
diff --git a/litellm/llms/base_llm/base_utils.py b/litellm/llms/base_llm/base_utils.py
index c9ef7d77ed8..32f98fbc933 100644
--- a/litellm/llms/base_llm/base_utils.py
+++ b/litellm/llms/base_llm/base_utils.py
@@ -52,7 +52,10 @@ class BaseLLMModelInfo(ABC):
def get_model_cost_key(self, model: str) -> str | None:
"""
- Extra `litellm.model_cost` key to try for this provider's spelling of `model`, after the exact keys miss.
+ Maps the model name a user sends to the key `litellm.model_cost` stores it under, when the two differ.
+ `get_model_info` tries this key once the exact `model` and `provider/model` keys miss. The default None means
+ the provider's user-facing names already match the cost map, so there is nothing extra to try. Fireworks
+ overrides it: `deepseek-r1` -> `fireworks_ai/accounts/fireworks/models/deepseek-r1`.
"""
return None