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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Add support for new flash model
Sameer Kankute9e3f946a2e4d
diff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.pyindex feae8395178..efe6c3fcba1 100644--- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py+++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py@@ -228,11 +228,17 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):Gemini 3 models include:- gemini-3-pro-preview+ - gemini-3-flash+ - skyhawk (Gemini 3 Flash checkpoint)- Any future Gemini 3.x models"""# Check for Gemini 3 modelsif "gemini-3" in model:return True++ # Check for skyhawk (Gemini 3 Flash checkpoint)+ if "skyhawk" in model.lower():+ return Truereturn False@@ -685,22 +691,40 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):Returns:GeminiThinkingConfig with thinkingLevel and includeThoughts"""+ # Check if this is skyhawk/gemini-3-flash which supports MINIMAL thinking level+ is_skyhawk = model and (+ "skyhawk" in model.lower() or "gemini-3-flash" in model.lower()+ )if reasoning_effort == "minimal":- return {"thinkingLevel": "low", "includeThoughts": True}+ if is_skyhawk:+ return {"thinkingLevel": "minimal", "includeThoughts": True}+ else:+ return {"thinkingLevel": "low", "includeThoughts": True}elif reasoning_effort == "low":return {"thinkingLevel": "low", "includeThoughts": True}elif reasoning_effort == "medium":- return {- "thinkingLevel": "high",- "includeThoughts": True,- } # medium is not out yet+ # For skyhawk, medium maps to "medium", otherwise "high"+ if is_skyhawk:+ return {"thinkingLevel": "medium", "includeThoughts": True}+ else:+ return {+ "thinkingLevel": "high",+ "includeThoughts": True,+ } # medium is not out yet for other modelselif reasoning_effort == "high":return {"thinkingLevel": "high", "includeThoughts": True}elif reasoning_effort == "disable":- # Gemini 3 cannot fully disable thinking, so we use "low" but hide thoughts- return {"thinkingLevel": "low", "includeThoughts": False}+ # Gemini 3 cannot fully disable thinking, so we use "minimal" for skyhawk, "low" for others+ if is_skyhawk:+ return {"thinkingLevel": "minimal", "includeThoughts": False}+ else:+ return {"thinkingLevel": "low", "includeThoughts": False}elif reasoning_effort == "none":- return {"thinkingLevel": "low", "includeThoughts": False}+ # For skyhawk, use "minimal" instead of "low"+ if is_skyhawk:+ return {"thinkingLevel": "minimal", "includeThoughts": False}+ else:+ return {"thinkingLevel": "low", "includeThoughts": False}else:raise ValueError(f"Invalid reasoning effort: {reasoning_effort}")@@ -970,7 +994,10 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):"thinkingLevel" not in thinking_configand "thinkingBudget" not in thinking_config):- thinking_config["thinkingLevel"] = "low"+ # For skyhawk, default to "minimal" to match Gemini 2.5 Flash behavior+ # For other Gemini 3 models, default to "low"+ is_skyhawk = "skyhawk" in model.lower() or "gemini-3-flash" in model.lower()+ thinking_config["thinkingLevel"] = "minimal" if is_skyhawk else "low"optional_params["thinkingConfig"] = thinking_configreturn optional_paramsdiff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 99ef201acda..33f234d065a 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -14732,6 +14732,98 @@"supports_web_search": true,"tpm": 800000},+ "gemini/skyhawk": {+ "cache_read_input_token_cost": 3e-08,+ "input_cost_per_audio_token": 1e-06,+ "input_cost_per_token": 3e-07,+ "litellm_provider": "gemini",+ "max_audio_length_hours": 8.4,+ "max_audio_per_prompt": 1,+ "max_images_per_prompt": 3000,+ "max_input_tokens": 1048576,+ "max_output_tokens": 65535,+ "max_pdf_size_mb": 30,+ "max_tokens": 65535,+ "max_video_length": 1,+ "max_videos_per_prompt": 10,+ "mode": "chat",+ "output_cost_per_reasoning_token": 2.5e-06,+ "output_cost_per_token": 2.5e-06,+ "rpm": 2000,+ "source": "https://ai.google.dev/gemini-api/docs/models",+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/completions",+ "/v1/batch"+ ],+ "supported_modalities": [+ "text",+ "image",+ "audio",+ "video"+ ],+ "supported_output_modalities": [+ "text"+ ],+ "supports_audio_output": false,+ "supports_function_calling": true,+ "supports_parallel_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_url_context": true,+ "supports_vision": true,+ "supports_web_search": true,+ "tpm": 800000+ },+ "skyhawk": {+ "cache_read_input_token_cost": 3e-08,+ "input_cost_per_audio_token": 1e-06,+ "input_cost_per_token": 3e-07,+ "litellm_provider": "vertex_ai-language-models",+ "max_audio_length_hours": 8.4,+ "max_audio_per_prompt": 1,+ "max_images_per_prompt": 3000,+ "max_input_tokens": 1048576,+ "max_output_tokens": 65535,+ "max_pdf_size_mb": 30,+ "max_tokens": 65535,+ "max_video_length": 1,+ "max_videos_per_prompt": 10,+ "mode": "chat",+ "output_cost_per_reasoning_token": 2.5e-06,+ "output_cost_per_token": 2.5e-06,+ "source": "https://ai.google.dev/gemini-api/docs/models",+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/completions",+ "/v1/batch"+ ],+ "supported_modalities": [+ "text",+ "image",+ "audio",+ "video"+ ],+ "supported_output_modalities": [+ "text"+ ],+ "supports_audio_output": false,+ "supports_function_calling": true,+ "supports_parallel_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_url_context": true,+ "supports_vision": true,+ "supports_web_search": true+ },"gemini/gemini-2.5-pro-exp-03-25": {"cache_read_input_token_cost": 0.0,"input_cost_per_token": 0.0,diff --git a/litellm/types/llms/vertex_ai.py b/litellm/types/llms/vertex_ai.pyindex 9bc4ca1703d..381d91de762 100644--- a/litellm/types/llms/vertex_ai.py+++ b/litellm/types/llms/vertex_ai.py@@ -169,7 +169,7 @@ class SafetSettingsConfig(TypedDict, total=False):class GeminiThinkingConfig(TypedDict, total=False):includeThoughts: boolthinkingBudget: int- thinkingLevel: Literal["low", "medium", "high"]+ thinkingLevel: Literal["minimal", "low", "medium", "high"]GeminiResponseModalities = Literal["TEXT", "IMAGE", "AUDIO", "VIDEO"]diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 99ef201acda..33f234d065a 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -14732,6 +14732,98 @@"supports_web_search": true,"tpm": 800000},+ "gemini/skyhawk": {+ "cache_read_input_token_cost": 3e-08,+ "input_cost_per_audio_token": 1e-06,+ "input_cost_per_token": 3e-07,+ "litellm_provider": "gemini",+ "max_audio_length_hours": 8.4,+ "max_audio_per_prompt": 1,+ "max_images_per_prompt": 3000,+ "max_input_tokens": 1048576,+ "max_output_tokens": 65535,+ "max_pdf_size_mb": 30,+ "max_tokens": 65535,+ "max_video_length": 1,+ "max_videos_per_prompt": 10,+ "mode": "chat",+ "output_cost_per_reasoning_token": 2.5e-06,+ "output_cost_per_token": 2.5e-06,+ "rpm": 2000,+ "source": "https://ai.google.dev/gemini-api/docs/models",+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/completions",+ "/v1/batch"+ ],+ "supported_modalities": [+ "text",+ "image",+ "audio",+ "video"+ ],+ "supported_output_modalities": [+ "text"+ ],+ "supports_audio_output": false,+ "supports_function_calling": true,+ "supports_parallel_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_url_context": true,+ "supports_vision": true,+ "supports_web_search": true,+ "tpm": 800000+ },+ "skyhawk": {+ "cache_read_input_token_cost": 3e-08,+ "input_cost_per_audio_token": 1e-06,+ "input_cost_per_token": 3e-07,+ "litellm_provider": "vertex_ai-language-models",+ "max_audio_length_hours": 8.4,+ "max_audio_per_prompt": 1,+ "max_images_per_prompt": 3000,+ "max_input_tokens": 1048576,+ "max_output_tokens": 65535,+ "max_pdf_size_mb": 30,+ "max_tokens": 65535,+ "max_video_length": 1,+ "max_videos_per_prompt": 10,+ "mode": "chat",+ "output_cost_per_reasoning_token": 2.5e-06,+ "output_cost_per_token": 2.5e-06,+ "source": "https://ai.google.dev/gemini-api/docs/models",+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/completions",+ "/v1/batch"+ ],+ "supported_modalities": [+ "text",+ "image",+ "audio",+ "video"+ ],+ "supported_output_modalities": [+ "text"+ ],+ "supports_audio_output": false,+ "supports_function_calling": true,+ "supports_parallel_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_url_context": true,+ "supports_vision": true,+ "supports_web_search": true+ },"gemini/gemini-2.5-pro-exp-03-25": {"cache_read_input_token_cost": 0.0,"input_cost_per_token": 0.0,