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.py index 9ea1c2ee12..f443a59dc3 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 @@ -1542,7 +1542,9 @@ class ModelResponseIterator: and "parts" in gemini_chunk["content"] ): if "text" in gemini_chunk["content"]["parts"][0]: - text = gemini_chunk["content"]["parts"][0]["text"] + text = VertexGeminiConfig().get_assistant_content_message( + parts=gemini_chunk["content"]["parts"] + ) elif "functionCall" in gemini_chunk["content"]["parts"][0]: function_call = ChatCompletionToolCallFunctionChunk( name=gemini_chunk["content"]["parts"][0]["functionCall"][ diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 55052761c7..b8c24abfc6 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -5975,6 +5975,48 @@ "source": "https://aistudio.google.com", "supports_tool_choice": true }, + "gemini-2.0-flash-thinking-exp-1219": { + "max_tokens": 32000, + "max_input_tokens": 32000, + "max_output_tokens": 32000, + "max_images_per_prompt": 3000, + "max_videos_per_prompt": 10, + "max_video_length": 1, + "max_audio_length_hours": 8.4, + "max_audio_per_prompt": 1, + "max_pdf_size_mb": 30, + "input_cost_per_token": 0.00000035, + "input_cost_per_token_above_128k_tokens": 0.0000007, + "output_cost_per_token": 0.00000105, + "output_cost_per_token_above_128k_tokens": 0.0000021, + "litellm_provider": "gemini", + "mode": "chat", + "supports_system_messages": true, + "supports_function_calling": true, + "supports_vision": true, + "source": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#foundation_models" + }, + "gemini/gemini-2.0-flash-thinking-exp-1219": { + "max_tokens": 32000, + "max_input_tokens": 32000, + "max_output_tokens": 32000, + "max_images_per_prompt": 3000, + "max_videos_per_prompt": 10, + "max_video_length": 1, + "max_audio_length_hours": 8.4, + "max_audio_per_prompt": 1, + "max_pdf_size_mb": 30, + "input_cost_per_token": 0.00000035, + "input_cost_per_token_above_128k_tokens": 0.0000007, + "output_cost_per_token": 0.00000105, + "output_cost_per_token_above_128k_tokens": 0.0000021, + "litellm_provider": "gemini", + "mode": "chat", + "supports_system_messages": true, + "supports_function_calling": true, + "supports_vision": true, + "source": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#foundation_models" + }, "vertex_ai/claude-3-sonnet": { "max_tokens": 4096, "max_input_tokens": 200000,