mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
The Vertex location decides the regional pricing uplift. The completion path
sets it on litellm_params and async_anthropic_messages_handler records it on
the logging object, but generate_content passed only litellm_call_id, so the
cost calculator never saw it.
The result is that a model configured `vertex_location: global` is priced as
us-central1 on POST /v1beta/models/{model}:generateContent and costs 10% more
than the same model over /v1/chat/completions. Two requests differing only in
the URL are billed differently, and spend cannot be reconciled against the
cloud bill.
Uses the same VertexBase.explicit_vertex_ai_location helper the anthropic
messages path already uses, so an unset location records nothing and the cost
calculator keeps its own fallback.
Fixes #40692
Signed-off-by: Ankit Jha <jhaankit373@gmail.com>
|
||
|---|---|---|
| .. | ||
| test_google_genai_adapter.py | ||
| test_google_genai_adapter_fixes.py | ||
| test_google_genai_handler.py | ||
| test_google_genai_main.py | ||
| test_google_genai_streaming_iterator.py | ||
| test_google_genai_transformation.py | ||