fix(google.py): fix cost tracking for vertex ai mistral models

This commit is contained in:
Krrish Dholakia
2024-08-01 15:22:32 -07:00
parent 63735c9a54
commit 1ffd96b348
2 changed files with 4 additions and 1 deletions
@@ -44,7 +44,9 @@ def cost_router(
Returns
- str, the specific google cost calc function it should route to.
"""
if custom_llm_provider == "vertex_ai" and ("claude" in model or "llama" in model):
if custom_llm_provider == "vertex_ai" and (
"claude" in model or "llama" in model or "mistral" in model
):
return "cost_per_token"
elif custom_llm_provider == "gemini":
return "cost_per_token"
@@ -904,6 +904,7 @@ from litellm.tests.test_completion import response_format_tests
"model",
[
"vertex_ai/mistral-large@2407",
"vertex_ai/mistral-nemo@2407",
"vertex_ai/meta/llama3-405b-instruct-maas",
], #
) # "vertex_ai",