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]

fix(cost): move gemini-embedding-2-preview to per-token rates

kerrya28ea22ec131
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 9299a1493f8..29243832c45 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -25604,6 +25604,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "vertex_ai-embedding-models",
"max_input_tokens": 8192,
@@ -25634,6 +25635,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "vertex_ai",
"max_input_tokens": 8192,
@@ -25692,6 +25694,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "gemini",
"max_input_tokens": 8192,
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 9299a1493f8..29243832c45 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -25604,6 +25604,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "vertex_ai-embedding-models",
"max_input_tokens": 8192,
@@ -25634,6 +25635,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "vertex_ai",
"max_input_tokens": 8192,
@@ -25692,6 +25694,7 @@
"input_cost_per_audio_token": 6.5e-06,
"input_cost_per_image_token": 4.5e-07,
"input_cost_per_token": 2e-07,
+ "input_cost_per_token_batches": 1e-07,
"input_cost_per_video_token": 1.2e-05,
"litellm_provider": "gemini",
"max_input_tokens": 8192,
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index 04d2d35e05f..1da53fba923 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -2946,7 +2946,7 @@ def test_model_info_for_openrouter_kimi_k2_5():
def test_gemini_embedding_2_ga_in_cost_map():
- """GA and Vertex preview gemini-embedding-2 entries align with multimodal unit pricing."""
+ """GA and Vertex preview gemini-embedding-2 entries align with multimodal token pricing."""
import json
from pathlib import Path
@@ -2968,9 +2968,12 @@ def test_gemini_embedding_2_ga_in_cost_map():
assert info.get("mode") == "embedding"
assert info.get("supports_multimodal") is True
assert info.get("input_cost_per_token") == 2e-07
- assert info.get("input_cost_per_image") == 0.00012
- assert info.get("input_cost_per_audio_per_second") == 0.00016
- assert info.get("input_cost_per_video_per_second") == 0.00079
+ assert info.get("input_cost_per_audio_token") == 6.5e-06
+ assert info.get("input_cost_per_image_token") == 4.5e-07
+ assert info.get("input_cost_per_video_token") == 1.2e-05
+ assert "input_cost_per_image" not in info
+ assert "input_cost_per_audio_per_second" not in info
+ assert "input_cost_per_video_per_second" not in info
if provider in ("vertex_ai-embedding-models", "vertex_ai"):
assert (
info.get("uses_embed_content") is True