From 282617f2bcc75a223d023e9d0432b6ae3e614bce Mon Sep 17 00:00:00 2001 From: Tim Elfrink Date: Fri, 19 Sep 2025 07:58:58 +0200 Subject: [PATCH] Fix gemini-2.5-flash-image-preview model routing - Update mode from 'chat' to 'image_generation' for both model variants - Ensures correct routing to image generation endpoints - Resolves 400 'request not supported' error for image generation --- litellm/model_prices_and_context_window_backup.json | 4 ++-- model_prices_and_context_window.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 29100016bb0..43ea3af320f 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -9126,7 +9126,7 @@ "max_tokens": 65535, "max_video_length": 1, "max_videos_per_prompt": 10, - "mode": "chat", + "mode": "image_generation", "output_cost_per_image": 0.039, "output_cost_per_reasoning_token": 3e-05, "output_cost_per_token": 3e-05, @@ -10489,7 +10489,7 @@ "max_tokens": 65535, "max_video_length": 1, "max_videos_per_prompt": 10, - "mode": "chat", + "mode": "image_generation", "output_cost_per_image": 0.039, "output_cost_per_reasoning_token": 3e-05, "output_cost_per_token": 3e-05, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 29100016bb0..43ea3af320f 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -9126,7 +9126,7 @@ "max_tokens": 65535, "max_video_length": 1, "max_videos_per_prompt": 10, - "mode": "chat", + "mode": "image_generation", "output_cost_per_image": 0.039, "output_cost_per_reasoning_token": 3e-05, "output_cost_per_token": 3e-05, @@ -10489,7 +10489,7 @@ "max_tokens": 65535, "max_video_length": 1, "max_videos_per_prompt": 10, - "mode": "chat", + "mode": "image_generation", "output_cost_per_image": 0.039, "output_cost_per_reasoning_token": 3e-05, "output_cost_per_token": 3e-05,