test(spend): expect token billing for Vertex image edits (#51148)

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-11-11 06:27:58 +00:00 • committed by GitHub
parent 97f07af044
commit 525df3f9a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -393,7 +393,7 @@ def test_image_edit_spend_follows_the_vertex_location(gateway: Gateway, location
images: Final = raw.parse()
assert images.data is not None and [image.b64_json for image in images.data] == ["aW1n"], images
prices: Final = _published_prices(gateway, model)
expected: Final = _rate(prices, "output_cost_per_image") * _uplift(prices, placed)
expected: Final = _standard_cost(prices) * _uplift(prices, placed)
assert float(raw.headers["x-litellm-response-cost"]) == pytest.approx(expected), raw.headers
(sent,) = _only_generate_calls(wire, 1)
forwarded: Final = sent.body.decode()