mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
chore(google_genai): shorten comments
This commit is contained in:
parent
9d40dc7b26
commit
849baa8f8f
2 changed files with 3 additions and 9 deletions
|
|
@ -193,10 +193,8 @@ class GenerateContentHelper:
|
|||
if litellm_logging_obj is None:
|
||||
raise ValueError("litellm_logging_obj is required, but got None")
|
||||
|
||||
# The configured Vertex location decides the regional pricing uplift. The
|
||||
# completion and anthropic_messages paths both record it here; without it
|
||||
# the cost calculator falls back to a default region and prices a `global`
|
||||
# model as us-central1, so the same model costs 10% more on this route.
|
||||
# Record the configured location so a `global` model is not priced as
|
||||
# us-central1 (+10%), matching the completion path.
|
||||
from litellm.llms.vertex_ai.vertex_llm_base import VertexBase
|
||||
|
||||
explicit_vertex_location: Final = VertexBase.explicit_vertex_ai_location(
|
||||
|
|
|
|||
|
|
@ -282,11 +282,7 @@ def test_vertex_location_recorded_for_cost_calculation(configured_location):
|
|||
"""
|
||||
Regression for https://github.com/BerriAI/litellm/issues/40692
|
||||
|
||||
The Vertex location decides the regional pricing uplift. The completion and
|
||||
anthropic_messages paths record it on the logging object so the cost
|
||||
calculator can price against the configured region. generate_content did
|
||||
not, so a model configured `vertex_location: global` was priced as
|
||||
us-central1 and cost 10% more than the same model over /v1/chat/completions.
|
||||
generate_content must record vertex_location so `global` is not priced as us-central1.
|
||||
"""
|
||||
from litellm.google_genai.main import GenerateContentHelper
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue