From 7bf4f89313b360a8fadeb6a4ebacd15801c921ce Mon Sep 17 00:00:00 2001 From: michaelxer Date: Mon, 3 Aug 2026 11:12:22 +0700 Subject: [PATCH] style: ruff format databricks cost_calculator CI lint failed because ruff format --check wanted single-line startswith/generic_cost_per_token calls. --- litellm/llms/databricks/cost_calculator.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/litellm/llms/databricks/cost_calculator.py b/litellm/llms/databricks/cost_calculator.py index 96d0202d512..471f8e08977 100644 --- a/litellm/llms/databricks/cost_calculator.py +++ b/litellm/llms/databricks/cost_calculator.py @@ -21,13 +21,9 @@ def _resolve_databricks_base_model(model: str) -> str: """ if model.startswith("databricks/dbrx-instruct") or model.startswith("dbrx-instruct"): return "databricks-dbrx-instruct" - if model.startswith("databricks/meta-llama-3.1-70b-instruct") or model.startswith( - "meta-llama-3.1-70b-instruct" - ): + if model.startswith("databricks/meta-llama-3.1-70b-instruct") or model.startswith("meta-llama-3.1-70b-instruct"): return "databricks-meta-llama-3-1-70b-instruct" - if model.startswith("databricks/meta-llama-3.1-405b-instruct") or model.startswith( - "meta-llama-3.1-405b-instruct" - ): + if model.startswith("databricks/meta-llama-3.1-405b-instruct") or model.startswith("meta-llama-3.1-405b-instruct"): return "databricks-meta-llama-3-1-405b-instruct" if ( model.startswith("databricks/mixtral-8x7b-instruct-v0.1") @@ -57,6 +53,4 @@ def cost_per_token(model: str, usage: Usage) -> tuple[float, float]: Tuple[float, float] - prompt_cost_in_usd, completion_cost_in_usd """ base_model = _resolve_databricks_base_model(model) - return generic_cost_per_token( - model=base_model, usage=usage, custom_llm_provider="databricks" - ) + return generic_cost_per_token(model=base_model, usage=usage, custom_llm_provider="databricks")