mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(vertex_ai): pin gemini-embedding-2 spend assertions to the bundled cost map
The four TestProcessEmbedContentResponseUsage cases that assert spend read the gemini-embedding-2 rates from litellm.model_cost, which is fetched from main at import time. main now prices that model per modality token and no longer carries input_cost_per_image / input_cost_per_audio_per_second / input_cost_per_video_per_second, so every embed-content cost assertion in this class fails on this branch regardless of the code under test. Use the existing local_model_cost_map fixture, which pins the bundled in-repo map, exactly as the other pricing tests do. Fixes #41224
This commit is contained in:
parent
e319bf270c
commit
a217303766
1 changed files with 7 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue