mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
test(vertex): pin gemini-embedding-2 cost tests to the local map
TestProcessEmbedContentResponseUsage hard-codes the per-image and per-second rates this branch registers for gemini-embedding-2. litellm loads model_cost from the network fetched main copy by default, and main #41157 rewrote gemini-embedding-2 to per-token billing, so the cost calls return 0.0 for image_count and video_length paths and audio_tokens double-bills at the new per-token rate. Force the packaged local map for the class so the assertions resolve against the same rates they were written against. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
252c71c0b2
commit
3ed052ff70
1 changed files with 7 additions and 0 deletions
|
|
@ -299,10 +299,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 dollar-value assertions read the per-image and per-second rates this
|
||||
branch registers for gemini-embedding-2. litellm defaults to the network
|
||||
fetched main model_cost, which now bills the modalities per token, so the
|
||||
cost calls return 0.0 or the wrong audio-token amount without the local
|
||||
map pinned.
|
||||
"""
|
||||
|
||||
MODEL = "gemini-embedding-2"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue