From 9c538a0b2faa1f5058108cf46bc9ded24393d129 Mon Sep 17 00:00:00 2001 From: Marty Sullivan Date: Fri, 14 Aug 2026 20:05:16 -0400 Subject: [PATCH] fix(pricing): price Gemini Live image input at Vertex's non-text rate The new Live entries carried no input_cost_per_image_token, so image tokens fell through to input_cost_per_token and billed at the $0.50/M text rate instead of $3.00/M, a 6x under-bill. Image input matters more on Live than the name suggests: Gemini reports a Live video stream as a sequence of frames under the IMAGE modality, so a camera feed is billed entirely through this field, and VIDEO never appears in a Live session's usage. Google documents video input as "roughly 258 tokens per second", and a single JPEG frame measured exactly 258 tokens against Vertex, so one frame is one second of video for billing. $3.00 per 1M tokens is Google's non-text Live input rate, on ai.google.dev/gemini-api/docs/pricing as "$3.00 (audio / video)" and on the Vertex generative-ai price sheet, matching the audio rate already in these entries. Applied to both the bare and the vertex_ai/-prefixed keys, since the prefixed one is what get_model_info resolves for custom_llm_provider="vertex_ai". --- litellm/model_prices_and_context_window_backup.json | 4 ++++ model_prices_and_context_window.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index bc562c070c3..2f71eb8c6a2 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -18472,6 +18472,7 @@ "gemini-live-2.5-flash": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18519,6 +18520,7 @@ "vertex_ai/gemini-live-2.5-flash": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18566,6 +18568,7 @@ "gemini-live-2.5-flash-native-audio": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18623,6 +18626,7 @@ "vertex_ai/gemini-live-2.5-flash-native-audio": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index bc562c070c3..2f71eb8c6a2 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -18472,6 +18472,7 @@ "gemini-live-2.5-flash": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18519,6 +18520,7 @@ "vertex_ai/gemini-live-2.5-flash": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18566,6 +18568,7 @@ "gemini-live-2.5-flash-native-audio": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06, @@ -18623,6 +18626,7 @@ "vertex_ai/gemini-live-2.5-flash-native-audio": { "cache_read_input_token_cost": 7.5e-08, "input_cost_per_audio_token": 3e-06, + "input_cost_per_image_token": 3e-06, "input_cost_per_token": 5e-07, "output_cost_per_audio_token": 1.2e-05, "output_cost_per_token": 2e-06,