add cost tracking for pass through imagen

This commit is contained in:
Ishaan Jaff 2024-09-02 18:10:46 -07:00
parent 9fcab392a4
commit 4a0fdc40f1
4 changed files with 12 additions and 2 deletions

View file

@ -110,6 +110,7 @@ class PassThroughEndpointLogging:
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_embeddings.embedding_handler import (
transform_vertex_response_to_openai,
)
from litellm.types.utils import PassthroughCallTypes
vertex_image_generation_class = VertexImageGeneration()
@ -127,6 +128,10 @@ class PassThroughEndpointLogging:
model=model,
)
)
logging_obj.call_type = (
PassthroughCallTypes.passthrough_image_generation.value
)
else:
litellm_model_response = await transform_vertex_response_to_openai(
response=_json_response,