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]

use _get_model_info_helper (#7703)

Ishaan Jaffdab7bebaf2bc
diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py
index 9690a4d8b48..93961b13720 100644
--- a/litellm/cost_calculator.py
+++ b/litellm/cost_calculator.py
@@ -60,6 +60,7 @@ from litellm.utils import (
ModelResponse,
TextCompletionResponse,
TranscriptionResponse,
+ _get_model_info_helper,
print_verbose,
token_counter,
)
@@ -278,7 +279,7 @@ def cost_per_token( # noqa: PLR0915
elif custom_llm_provider == "deepseek":
return deepseek_cost_per_token(model=model, usage=usage_block)
else:
- model_info = litellm.get_model_info(
+ model_info = _get_model_info_helper(
model=model, custom_llm_provider=custom_llm_provider
)