diff --git a/litellm/llms/vertex_ai/vertex_embeddings/transformation.py b/litellm/llms/vertex_ai/vertex_embeddings/transformation.py index dd3dbfa0319..eae42a980b9 100644 --- a/litellm/llms/vertex_ai/vertex_embeddings/transformation.py +++ b/litellm/llms/vertex_ai/vertex_embeddings/transformation.py @@ -229,7 +229,7 @@ class VertexAITextEmbeddingConfig(LiteLLMBaseModel): if VertexBGEConfig.is_bge_model(model): return VertexBGEConfig.transform_response(response=response, model=model, model_response=model_response) - if not isinstance(response, dict) or "predictions" not in response: + if "predictions" not in response: raise ValueError("Vertex embedding response missing 'predictions' field") _predictions: Final = response["predictions"] @@ -260,7 +260,7 @@ class VertexAITextEmbeddingConfig(LiteLLMBaseModel): """ Transforms a vertex fine-tuned model embedding response to an openai response format. """ - if not isinstance(response, dict) or "predictions" not in response: + if "predictions" not in response: raise ValueError("Vertex embedding response missing 'predictions' field") _predictions: Final = response["predictions"]