This commit is contained in:
Rafael Macario 2026-08-27 20:01:45 -05:00 committed by GitHub
commit bbf7d70e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -120,7 +120,7 @@ def cost_per_character(
prompt_cost = prompt_characters * model_info["input_cost_per_character"]
except Exception as e:
verbose_logger.debug(
"litellm.litellm_core_utils.llm_cost_calc.google.py::cost_per_character(): Exception occured - %s\nDefaulting to None",
"litellm.llms.vertex_ai.cost_calculator.py::cost_per_character(): Exception occured - %s\nDefaulting to None",
e,
)
prompt_cost, _ = cost_per_token(
@ -161,7 +161,7 @@ def cost_per_character(
completion_cost = completion_characters * model_info["output_cost_per_character"]
except Exception as e:
verbose_logger.debug(
"litellm.litellm_core_utils.llm_cost_calc.google.py::cost_per_character(): Exception occured - %s\nDefaulting to None",
"litellm.llms.vertex_ai.cost_calculator.py::cost_per_character(): Exception occured - %s\nDefaulting to None",
e,
)
_, completion_cost = cost_per_token(

View file

@ -723,7 +723,7 @@ def test_vertex_ai_embedding_completion_cost(caplog):
for item in captured_logs:
print("\nitem:{}\n".format(item))
if (
"litellm.litellm_core_utils.llm_cost_calc.google.cost_per_character(): Exception occured "
"litellm.llms.vertex_ai.cost_calculator.py::cost_per_character(): Exception occured "
in item
):
raise Exception("Error log raised for calculating embedding cost")