diff --git a/tests/unit/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py b/tests/unit/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py index ba2b26bf0a2..a11ce79a3e9 100644 --- a/tests/unit/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py +++ b/tests/unit/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py @@ -308,10 +308,17 @@ class TestProcessResponse: ) +@pytest.mark.usefixtures("local_model_cost_map") class TestProcessEmbedContentResponseUsage: """Gemini Embedding 2 embedContent usageMetadata must drive spend. Regression for multimodal calls recording prompt_tokens=0 / spend=$0. + + The spend assertions read the ``gemini-embedding-2`` rates, so they must be + pinned to the bundled in-repo cost map: the default network-fetched ``main`` + copy is a different branch and already re-prices this model per modality + token (no ``input_cost_per_image`` / ``input_cost_per_*_per_second``), which + makes these cases fail for reasons unrelated to the transformation. """ MODEL = "gemini-embedding-2"