From bff4227f6ae11686f3143b51dcb320b8ce5af9e6 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 23 May 2024 16:27:08 -0700 Subject: [PATCH] feat - add prixing for vertex_ai image gen --- litellm/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index c8c4917540..72b734ffac 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4659,6 +4659,11 @@ def completion_cost( or call_type == CallTypes.aimage_generation.value ): ### IMAGE GENERATION COST CALCULATION ### + if custom_llm_provider == "vertex_ai": + # https://cloud.google.com/vertex-ai/generative-ai/pricing + # Vertex Charges Flat $0.20 per image + return 0.020 + # fix size to match naming convention if "x" in size and "-x-" not in size: size = size.replace("x", "-x-")