The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Add not_available in inference_geo
Sameer Kankute40ff79655c57
diff --git a/litellm/llms/anthropic/cost_calculation.py b/litellm/llms/anthropic/cost_calculation.pyindex a1a2803c2cb..11b61cc92f0 100644--- a/litellm/llms/anthropic/cost_calculation.py+++ b/litellm/llms/anthropic/cost_calculation.py@@ -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