From f1fe61af06ddefcf086ec831cc172107c6e8c886 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 13 Sep 2026 03:36:00 +0000 Subject: [PATCH] docs(fireworks): explain what get_model_cost_key is for Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/llms/base_llm/base_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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