6 views
-/https://github.com/berriai/litellm/issues/34393
GitHub Ā· issue

#34393 [Bug]: vertex_ai region-based cost tracking not supported (works for bedrock & azure)

  • State: open
  • Author: @jguokion
  • Labels: llm translation

### What happened?

Region-based cost tracking works for **bedrock** and **azure** but **not** for **vertex_ai**. All vertex_ai regions are billed at the same model-name price, even though Google charges different rates for the global endpoint vs. non-global (regional) endpoints such as `eu`.

`cost_calculator.py` supports region-scoped pricing keys of the form `"{provider}/{region_name}/{model}"` and uses them when present in `litellm.model_cost` (verified at v1.95.0-dev.1, `cost_calculator.py:454`):

```python model_with_provider_and_region = f"{custom_llm_provider}/{region_name}/{model}" if model_with_provider_and_region in model_cost_ref: # use region based pricing, if it's available model_with_provider = model_with_provider_and_region ```

`region_name` is read from the response's `_hidden_params` (`cost_calculator.py:1291`):

```python region_name = hidden_params.get("region_name", region_name) ```

But `region_name` is only ever **populated for bedrock** — it is hardcoded from `aws_region_name` in `main.py:5174`:

```python if model_response is not None and hasattr(model_response, "_hidden_params"): model_response._hidden_params["custom_llm_provider"] = custom_llm_p…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d17h52m40s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2996
The right issue is harder because it requires a dependency upgrade across breaking API changes, integration migration, compatibility handling, and broader regression testing. The left issue is narrower, mainly involving provider metadata propagation and targeted pricing-path validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search