mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Add not_available in inference_geo
This commit is contained in:
parent
786bd6ebc0
commit
40ff79655c
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ def cost_per_token(model: str, usage: "Usage") -> Tuple[float, float]:
|
|||
Tuple[float, float] - prompt_cost_in_usd, completion_cost_in_usd
|
||||
"""
|
||||
# If usage has inference_geo, prepend it as prefix to model name
|
||||
if hasattr(usage, "inference_geo") and usage.inference_geo and usage.inference_geo.lower() != "global":
|
||||
if hasattr(usage, "inference_geo") and usage.inference_geo and usage.inference_geo.lower() not in ["global", "not_available"]:
|
||||
model_with_geo_prefix = f"{usage.inference_geo}/{model}"
|
||||
else:
|
||||
model_with_geo_prefix = model
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue